# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-mpmath
_pkgorig=mpmath
pkgver=1.3.0
pkgrel=3
pkgdesc="A Python library for arbitrary-precision floating-point arithmetic"
url="https://mpmath.org/"
arch="all"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
checkdepends="
	python3
	py3-pycodestyle
	py3-pytest-xdist
	py3-pytest-cov
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/m/mpmath/mpmath-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	cd build/lib/mpmath/tests/
	python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl

	rm -r "$pkgdir"/usr/lib/python3.*/site-packages/mpmath/tests
}

sha512sums="
a68028150095d743eae9669a0f70cbe6b7bcb4d27dfad6b1a96575f0885ec7306459a2a464117bab18779883ee8b4293502b4bd0ebd8672767e1d08d38f8b202  py3-mpmath-1.3.0.tar.gz
"
